package com.kotlin.baselib.utils

import android.annotation.SuppressLint
import android.content.Context
import android.widget.Toast

/**
 * @Description ：
 * @Time : 2021/7/15 15:05
 * @Author : DaDi
 */
object ToastUtil {
    private var toast: Toast? = null
    fun showToast(context: Context?, message: String?) {
        if (toast == null) {
            toast = Toast.makeText(context, message, Toast.LENGTH_SHORT)
        }
        toast!!.setText(message)
        toast!!.show()
    }
}